<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();//获得项目的根目录，上下文路径
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<title>书店</title>
<style>
	a{
		text-decoration: none;
		margin-left: 400px;
		color:black;
	}
</style>
</head>
<body>
<c:if test="${I>0}">
		<script>
			alert("添加成功！！！");
		</script>
	</c:if>
	<c:remove var="I" scope="session" />
	<div align="center">
		<form method="get" action="show.html">
			<span> <select name="select">
					<option value="name">书名</option>
					<option value="author">作者</option>
					<option value="publish">出版社</option>
			</select> <input type="text" name="input" /> <input type="submit" />
			</span>
		</form>
		<a href="jsp/addBooks.jsp">增加新书</a>
	</div>
	<table border="1" class="providerTable" cellpadding="0" cellspacing="0"
		style="width: 50%" align="center">
		<tr class="firstTr">
			<th width="20%">书名</th>
			<th width="20%">作者</th>
			<th width="30%">出版社</th>
			<th width="15%">页数</th>
			<th width="15%">价格</th>
		</tr>
		<c:forEach items="${LIST}" var="books" varStatus="num">
			<tr>
				<td>${books.name}</td>
				<td>${books.author }</td>
				<td>${books.publish }</td>
				<td>${books.page }</td>
				<td>${books.price }</td>
			</tr>
		</c:forEach>
	</table>

</body>
</html>